<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="/struts-tags" prefix= "s" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ASIMS</title>
<link href="../CSS/style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/checkform.js">
</script>
<script>
function checkPassword(){

	if(document.getElementById("email").value===""){
		window.alert("请输入邮箱地址！");
		document.getElementById("email").focus();
	}	
	else if(!checkEmail(document.getElementById("email").value)){
	window.alert("邮箱地址格式不正确");
	document.getElementById("email").focus();
	return false;
	}
	else if(document.userInfo.repassword.value===""||document.userInfo.repassword1.value===""
    ||document.getElementById("password").value===""){
		window.alert("请输入密码！");
		document.userInfo.password.focus();
	}
	else if(document.userInfo.repassword.value === document.userInfo.repassword1.value){
	userInfo.action="updateInfo.action";
	userInfo.submit();
	}
	else{
	window.alert("请确认新密码！");
	document.userInfo.password.focus();
	} 
}
function checkEmail(email){
	var pos1 = email.indexOf("@",0);
	var pos2 = email.indexOf(".",0);
	if ((pos1 <= 0)||(pos1 === email.length)||(pos2 <= 0)||(pos2 === email.length))                
         return false;
       else
	     return true;
}
</script>
</head>
<body>
	<div id="wrap">
		<div id="header">
			<h1 id="sitename"><a href="#">ASIMS</a></h1>
			<div id="nav">
				<div id="titleblock">
					<div id="subject">机场静态信息管理系统</div>
					<div id="spirit"><a href="#"><%= session.getAttribute("username") %> 已登录</a> | <a href ="javascript:window.location.href='queryUserForIndex.action'">个人信息维护</a> | <a href="../login/login.jsp" target="_parent">注销</a></div>
				</div>
				<div id="topmenu">
					<ul>
						<li class="active"><a href="../login/index.jsp">首页</a></li>
						<li><a href="../rolemanage/user_manag.jsp">用户和角色管理</a></li>
						<li><a href="../airline_manage/airline_manag_InAr.jsp">航班信息管理</a></li>
						<li><a href="../facilities_manag/facilities_manag.jsp">机场设施管理</a></li>
						<li><a href="../news/news_view_intr.jsp">新闻中心</a></li>
					</ul>	
				</div>
			</div>
			<div class="clear"></div>
			<div id="breadcrumb">网站路径：<a href="../login/index.jsp">首页</a> &raquo; <a href="#"  class="active">个人信息维护</a></div>
		</div>
		
		<div id="content">
			<div id="right">
		  		<div class="post">
					<h2><a href="">个人信息修改</a></h2>
						<form name="userInfo"  method="post" enctype="multipart/form-data">
							<div class="contactform">
									<p class="first">
										<label for="usercode">员工号：</label>
										<s:label name="user.jobnumber" value="%{#request.updateuser.jobnumber}"></s:label><br/>
									</p>
									<p>
										<label for="name">电子邮箱：</label>
										<s:textfield name="user.useremail" id="email" value="%{#request.updateuser.useremail}"></s:textfield>
									</p>
									<p>	
										<label for="password">原密码：</label>
										<s:password name="user.password" id="password"></s:password>
									</p>
									<p>	
										<label for="repassword">新密码：</label>
										<s:password name="repassword" id="repassword"></s:password>
									</p>	
									<p>	
										<label for="repassword1">密码确认：</label>
										<s:password name="repassword1" id="repasword1"></s:password>
									</p>
									<p>	
										<label for="telephone">电　　话：</label>
										<s:textfield name="user.telephone" id="telephone" value="%{#request.updateuser.telephone}"></s:textfield>
									</p>
									<p>	
										<label for="cellphone">手　　机：</label>
										<s:textfield name="user.cellphone" id="cellphone" value="%{#request.updateuser.cellphone}"></s:textfield>
									</p>
									<p>	
										<s:select name="user.department" list="#{'财务部':'财务部',			
										'规划发展部':'规划发展部',
										'人事行政部':'人事行政部',
										'党群工作部':'党群工作部',
										'质量安全部':'质量安全部',
										'技术采购部':'技术采购部',
										'飞行区管理部':'飞行区管理部',
										'航站楼管理部':'航站楼管理部',
										'公共区管理部':'公共区管理部',
										'信息技术管理部':'信息技术管理部',
										'运行监控指挥部':'运行监控指挥部'}"
										label="部　　门" headkey="" headvalue="" value="%{#request.updateuser.department}">							
										</s:select>
									</p>
									<p>
										<s:select name="user.position" list="#{'机场地勤人员':'机场地勤人员',
										'顾客服务人员':'顾客服务人员',
										'管制员':'管制员',
										'咨询员':'咨询员',
										'安检员':'安检员',
										'机修人员':'机修人员',
										'部门主管':'部门主管',
										'财务专员':'财务专员',
										'行政管理':'行政管理',
										'采购员':'采购员',
										'运行指挥员':'运行指挥员',
										'航站楼管理员':'航站楼管理员',
										'公共区管理员':'公共区管理员',
										'信息技术员':'信息技术员'}"
										label="职　　位" headkey=" " headvalue="" value="%{#request.updateuser.position}">							
									</s:select>
									</p>
									<div class="buttons">
										<div class="butarea2"></div>
										<button type="submit" name="add" onClick="checkPassword()">
											<img src="../images/import16.png" alt=""/> 
											提交
										</button>
										<button type="reset" name="cancel" onClick="javascript:window.location.href='../login/index.jsp'">
											<img src="../images/cancel16.png" alt=""/> 
											取消
										</button>
								　　</div>
							</div>
						</form>
				</div>
			</div>

			<div id="sidebar">

				<div id="sidebartop"></div>

					<h2>首页</h2>
						<ul>
							<li><a href="../rolemanage/user_manag.jsp">用户和角色管理</a></li>
							<li><a href="../airline_manage/airline_manag_InAr.jsp">航班信息管理</a></li>
							<li><a href="../facilities_manag/facilities_manag.jsp">机场设施管理</a></li>
							<li><a href="../news/news_view_intr.jsp">新闻中心</a></li>
						</ul>
			</div>
			<div class="clear"></div>
			<div id="bottom">
				<p><img src="../images/copyright.jpg" /></p>
				<p><a href="">隐私权</a> | <a href="">&copy;版权</a> | <a href="">法律声明</a> | <a href="">电子邮件：admin@163.com</a>
			</div>
		</div>

		<div id="footer">
			<div id="credits">
				ASIMS Power by IBM
			</div>
		</div>
	</div>

</body>

</html>